// components/item/index.js
Component({
    lifetimes: {
        ready: function() {
            this.calcHeight();
        },
    },

    /**
     * 组件的初始数据
     */
    data: {},

    /**
     * 组件的方法列表
     */
    methods: {
        calcHeight() {
            // const query = wx.createSelectorQuery().in(this);
            const query = this.createSelectorQuery();
            query
                .select(".item")
                .boundingClientRect(function(rect) {
                    console.log(rect);
                })
                .exec();
        },
    },
});